<!DOCTYPE html>
<html>
<head>
    <title>门诊信息</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
    <meta name="description" content="">

    <link rel="stylesheet" href="/lib/weui.min.css">
    <link rel="stylesheet" href="/css/jquery-weui.css">
    <link rel="stylesheet" href="/css/home.css">
    <link rel="stylesheet" href="/plugins/fontaw/css/font-awesome.css">
<style>
    input::-webkit-input-placeholder{
        color: #adadab;
        text-size:0.8rem
    }
    input::-moz-placeholder{
        color: #adadab;
        text-size:0.8rem
    }
    input:-moz-placeholder{
        color: #adadab;
        text-size:0.8rem
    }
    input{color:lightgrey;font-size:0.8rem}
    .border--btm-1px{ border-bottom: 1px solid rgba(0,0,0,.1);}
    .clinic-info{padding:0.5rem;font-size:0.7rem;}
    .clinic-info p{color:grey}
    .day-table{background:rgba(190,190,190,.8);margin-top:0.4rem;color:grey}
    .day-table th{color:white;background-color:rgba(190,190,190,.8)}
    .day-table td{background:white;line-height: 1.5rem;height: 1.5rem}
    .weui-panel__hd{font-size:0.8rem}
</style>

</head>
<body>
<form action="/clinic/addClinic" method="post"  id="dataForm">
    <input type="hidden" name="doctorId" />
<div class="weui-panel weui-panel_access">
    <div class="weui-panel__hd"> <i class="fa fa-institution" aria-hidden="true"></i> 医院/诊所信息</div>
    <div class="weui-cell__bd">
        <div class="weui-cell ">
            <div class="weui-cell__bd">
                <input class="weui-input"  name="clinicname" placeholder="如：北京同仁医院">
            </div>
        </div>
        </div>
    </div>
</div>

<div class="weui-panel weui-panel_access" style="margin-top: 0.4rem">
    <div class="weui-panel__hd"> <i class="fa fa-hospital-o" aria-hidden="true"></i> 门诊地址</div>
    <div class="weui-panel__bd">
        <div class="weui-cell ">
            <div class="weui-cell__bd">
                <input class="weui-input" id="city-picker" name="area" placeholder="请选择区域">
            </div>
        </div>
        <div class="weui-cell ">
            <div class="weui-cell__bd">
                <input class="weui-input"  name="adddetail" placeholder="详细街道门牌信息">
            </div>
        </div>
    </div>
</div>

<div class="weui-panel weui-panel_access" style="margin-top: 0.4rem">
    <div class="weui-panel__hd"> <i class="fa fa-phone-square" aria-hidden="true"></i> 预约/联系方式</div>
    <div class="weui-cell__bd">
        <div class="weui-cell ">
            <div class="weui-cell__bd">
                <input class="weui-input"  name="contact" placeholder="如:预约电话、交通线路等信息">
            </div>
        </div>
    </div>
</div>

<div class="weui-panel weui-panel_access" style="margin-top: 0.4rem">
    <div class="weui-panel__hd"> <i class="fa fa-calendar" aria-hidden="true"></i> 门诊时间</div>
    <div class="weui-cell__bd">
        <div class="weui-cell ">
            <div class="weui-cell__bd">
                <table width="100%" class="day-table" cellspacing="1">
                    <tr align="center">
                        <td></td>
                        <td>上午</td>
                        <td>下午</td>
                        <td>晚上</td>
                    </tr>
                    <tr align="center">
                        <td>周一</td>
                        <td><input type="checkbox" name="description" value="0"/></td>
                        <td><input type="checkbox" name="description" value="1"/></td>
                        <td><input type="checkbox" name="description" value="2"/></td>
                    </tr>
                    <tr align="center">
                        <td>周二</td>
                        <td><input type="checkbox" name="description" value="3"/></td>
                        <td><input type="checkbox" name="description" value="4"/></td>
                        <td><input type="checkbox" name="description" value="5"/></td>
                    </tr>
                    <tr align="center">
                        <td>周三</td>
                        <td><input type="checkbox" name="description" value="6"/></td>
                        <td><input type="checkbox" name="description" value="7"/></td>
                        <td><input type="checkbox" name="description" value="8"/></td>
                    </tr>
                    <tr align="center">
                        <td>周四</td>
                        <td><input type="checkbox" name="description" value="9"/></td>
                        <td><input type="checkbox" name="description" value="10"/></td>
                        <td><input type="checkbox" name="description" value="11"/></td>
                    </tr>
                    <tr align="center">
                        <td>周五</td>
                        <td><input type="checkbox" name="description" value="12"/></td>
                        <td><input type="checkbox" name="description" value="13"/></td>
                        <td><input type="checkbox" name="description" value="14"/></td>
                    </tr>
                    <tr align="center">
                        <td>周六</td>
                        <td><input type="checkbox" name="description" value="15"/></td>
                        <td><input type="checkbox" name="description" value="16"/></td>
                        <td><input type="checkbox" name="description" value="17"/></td>
                    </tr>
                    <tr align="center">
                        <td>周日</td>
                        <td><input type="checkbox" name="description" value="18"/></td>
                        <td><input type="checkbox" name="description" value="19"/></td>
                        <td><input type="checkbox" name="description" value="20"/></td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>

<div class="weui-panel weui-panel_access" style="margin-top: 0.4rem;margin-bottom: 0.6rem">
    <a class="weui-btn weui-btn_primary" href="javascript:" style="line-height:2;width:90%"  onclick="saveData()" id="saveBtn"> 保存  </a>
</div>

</form>
<script src="/lib/jquery-2.1.4.js"></script>
<script src="/js/jquery.form.js"></script>
<script src="/js/jquery-weui.js"></script>
<script type="text/javascript" src="/js/city-picker.js" charset="utf-8"></script>
<script src="/js/home.js"></script>
<script>
    var doctorId = getQueryString("doctorId");
    $("input[name='doctorId']").val(doctorId);
    $(document).ready(function(){
        $("#city-picker").cityPicker({
            title: "选择所在地",
            onChange: function (picker, values, displayValues) {
            }
        });
    });

    function saveData(){
        $("#dataForm").ajaxSubmit({
            beforeSend:function () {
                enableOrDisableBtn($("#saveBtn"),false);
            },
            success:function (da) {
                location.href='/mod-page/studio/list_clinic.html?doctorId='+doctorId+"&_="+Math.random();
                //enableOrDisableBtn($("#saveBtn"),true);
            }
        });
    }

</script>
</body>
</html>